package com.wtwd.campus.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wtwd.campus.entity.Grade;
import com.wtwd.campus.model.vo.GradeVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author mjy
 * @date 2021/06/17
 * @description
 */
@Mapper
public interface GradeMapper extends BaseMapper<Grade> {

    List<Map<String, Object>> getGradeIdAndGradeNameBySchoolId(@Param("schoolId") Integer schoolId);

    int insertBatch(@Param("grades") List<Grade> grades);

    IPage<GradeVO> queryList(@Param("page") IPage page, @Param("list") List<Integer> schoolIds);

    List<Grade> listGradeBySchoolIds(@Param("list") List<Integer> schoolIds);
}
